﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace XMLMovieWebsite
{
    public partial class Site2 : System.Web.UI.MasterPage
    {
        Login objUser = new Login("", "");
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                objUser = Session["sesLogin"] as Login;
            }
            catch { }
            if (objUser != null)
            {
                Panel1.Visible = false;
                Panel2.Visible = true;
                Label2.Text += objUser.UserName;
            }
            else
            {
                Panel1.Visible = true;
                Panel2.Visible = false;
            }

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Session.RemoveAll();
            Response.Redirect("Default.aspx"); 
        }

        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("SreachMovie.aspx?Ten=" + TextBox3.Text);
        }
    }
}